package com.yuki.fwwb.DAO;

import com.yuki.fwwb.Entity.Weather;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface WeatherDao {


    @Select("SELECT * FROM weather WHERE DATE_FORMAT(weather_time, '%Y-%m-%d') = #{monthDay}")
    public Weather findWeatherByDay(String monthDay);


    @Select("SELECT * FROM weather WHERE DATE_FORMAT(weather_time, '%Y-%m') = #{month}")
    public List<Weather> findWeatherByMonth(String month);
}
